import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    int n = s.nextInt();
    s.nextLine(); // 消耗掉数字n后面的换行
    for(int i = 0; i < n; ++i){
      System.out.printf("|%s|\n", s.nextLine());
    }
  }
}